<template>
    <div>
        <h3>login</h3>
        <button @click="handleClick">登录</button>
    </div>
</template>
<!-- <script>
export default {
    methods: {
        handleClick() {
            localStorage.setItem("token", "aaaaa")
            //跳转首页
            this.$router.push("/")
        }
    }
}
</script> -->

<script setup lang="ts">
import { useRouter } from 'vue-router'
const router = useRouter()

const handleClick = () => {
    localStorage.setItem("token", "aaaaa")
    //跳转首页
    router.push("/")
}

</script>